export const getPrinting = data => {
    var htlmT = "<div style=\"padding:0px 20px;\">\n" +
        "\t\t\t<p style='text-align: center;font-size: 23px;font-weight: 700;letter-spacing: 16px;'>采购单</p>\n" +
        "\t\t\t<div>\n" +
        "\t\t\t\t<span style='display: inline-block;width: 40%;'>\n" +
        "\t\t\t\t\t审批单号：<span style='margin: 0px 5px 0px 5px;'>" + data.coded + "</span>\n" +
        "\t\t\t\t</span>\n" +
        "\t\t\t\t<span style='display: inline-block;width: 25%;'>\n" +
        "\t\t\t\t\t申请人：<span style='margin: 0px 5px 0px 5px;'>" + data.applyUserInfoName + "</span>\n" +
        "\t\t\t\t</span>\n" +
        "\t\t\t\t<span style='display: inline-block;width: 30%;'>\n" +
        "\t\t\t\t\t申请时间：<span style='margin: 0px 5px 0px 5px;'>" + data.purchasingDate + "</span>\n" +
        "\t\t\t\t</span>\n" +
        "\t\t\t</div>\n" +
        "\t\t\t<div style=\"margin-top: 15px;\">\n" +
        "\t\t\t\t<span style='display: inline-block;width: 95%;'>\n" +
        "\t\t\t\t\t备注：<span style='margin: 0px 35px 0px 5px;'>" + data.note + "</span>\n" +
        "\t\t\t\t</span>\n" +
        "\t\t\t</div>\n" +
        "\t\t\t\n" +
        "\t\t\t<table style=\"border: 1px #000000 solid;width: 100%;margin-top: 15px;\" cellpadding=\"0\" cellspacing=\"0\">\n" +
        "\t\t\t\t<thead>\n" +
        "\t\t\t\t\t<tr>\n" +
        "\t\t\t\t\t\t<th style=\"border-right: 1px #000000 solid;padding: 6px 4px;\">序号</th>\n" +
        "\t\t\t\t\t\t<th style=\"border-right: 1px #000000 solid;padding: 6px 4px;\">物品编号</th>\n" +
        "\t\t\t\t\t\t<th style=\"border-right: 1px #000000 solid;padding: 6px 4px;\">物品名称</th>\n" +
        "\t\t\t\t\t\t<th style=\"border-right: 1px #000000 solid;padding: 6px 4px;\">规格</th>\n" +
        // /*"\t\t\t\t\t\t<th style=\"border-right: 1px #000000 solid;padding: 6px 4px;\">库存量</th>\n" +*/
        "\t\t\t\t\t\t<th style=\"border-right: 1px #000000 solid;padding: 6px 4px;\">采购数量</th>\n" +
        "\t\t\t\t\t\t<th style=\"border-right: 1px #000000 solid;padding: 6px 4px;\">单价(元)</th>\n" +
        /*"\t\t\t\t\t\t<th style=\"border-right: 1px #000000 solid;padding: 6px 4px;\">总金额(元)</th>\n" +
        "\t\t\t\t\t\t<th style=\"border-right: 1px #000000 solid;padding: 6px 4px;\">单价(元)</th>\n" +*/
        "\t\t\t\t\t\t<th>总金额(元)</th>\n" +
        "\t\t\t\t\t</tr>\n" +
        "\t\t\t\t</thead>\n" +
        "\t\t\t\t<tbody>";
    var htmlTable = "<tr>\n" +
        "\t\t\t\t\t\t<td style=\"border-right: 1px #000000 solid;border-top: 1px #000000 solid;text-align: center;padding:4px 4px\">数据</td>\n" +
        "\t\t\t\t\t\t<td style=\"border-right: 1px #000000 solid;border-top: 1px #000000 solid;text-align: center;padding:4px 4px\">数据</td>\n" +
        "\t\t\t\t\t\t<td style=\"border-right: 1px #000000 solid;border-top: 1px #000000 solid;text-align: center;padding:4px 4px\">数据</td>\n" +
        "\t\t\t\t\t\t<td style=\"border-right: 1px #000000 solid;border-top: 1px #000000 solid;text-align: center;padding:4px 4px\">数据</td>\n" +
        "\t\t\t\t\t\t<td style=\"border-right: 1px #000000 solid;border-top: 1px #000000 solid;text-align: center;padding:4px 4px\">数据</td>\n" +
        "\t\t\t\t\t\t<td style=\"border-right: 1px #000000 solid;border-top: 1px #000000 solid;text-align: center;padding:4px 4px\">数据</td>\n" +
        "\t\t\t\t\t\t<td style=\"border-right: 1px #000000 solid;border-top: 1px #000000 solid;text-align: center;padding:4px 4px\">数据</td>\n" +
        "\t\t\t\t\t\t<td style=\"border-right: 1px #000000 solid;border-top: 1px #000000 solid;text-align: center;padding:4px 4px\">数据</td>\n" +
        "\t\t\t\t\t\t<td style=\"border-right: 1px #000000 solid;border-top: 1px #000000 solid;text-align: center;padding:4px 4px\">数据</td>\n" +
        "\t\t\t\t\t\t<td style=\"border-top: 1px #000000 solid;text-align: center;\">数据</td>\n" +
        "\t\t\t\t\t</tr>"
    var htmlTableW = "</tbody>\n" +
        "\t\t\t</table>"
    var htmlSH = "<div style=\"margin-top: 15px;border: 1px #000000 solid;border-radius: 5px;padding: 4px 6px;\">\n" +
        "\t\t\t\t<div>\n" +
        "\t\t\t\t\t<span style='display: inline-block;width: 30%;'>\n" +
        "\t\t\t\t\t\t审批时间：<span style='margin: 0px 5px 0px 5px;'>2011-01-01</span>\n" +
        "\t\t\t\t\t</span>\n" +
        "\t\t\t\t\t<span style='display: inline-block;width: 25%;'>\n" +
        "\t\t\t\t\t\t审批人：<span style='margin: 0px 5px 0px 5px;'>小明</span>\n" +
        "\t\t\t\t\t</span>\n" +
        "\t\t\t\t\t<span style='display: inline-block;width: 40%;'>\n" +
        "\t\t\t\t\t\t审批状态：<span style='margin: 0px 5px 0px 5px;'>12764674dadada</span>\n" +
        "\t\t\t\t\t</span>\n" +
        "\t\t\t\t</div>\n" +
        "\t\t\t\t<div style=\"margin-top: 05px;\">\n" +
        "\t\t\t\t\t<span style='display: inline-block;width: 95%;'>\n" +
        "\t\t\t\t\t\t备注：<span style='margin: 0px 35px 0px 5px;'>发发发发发发发发发发发发发发发发发发发发发发发发发发发发发发发发发发发发发发发发发发</span>\n" +
        "\t\t\t\t\t</span>\n" +
        "\t\t\t\t</div>\n" +
        "\t\t\t</div>"
    var htmlWB = "</div>";

    var dealTypeList = ['未提交','已提交','通过','不通过','已撤销'];

    var dataHtml = htlmT;
    data.purchasingList.forEach((item,i)=>{
        dataHtml += "<tr>\n" +
            "\t\t\t\t\t\t<td style=\"border-right: 1px #000000 solid;border-top: 1px #000000 solid;text-align: center;padding:4px 4px\">" + ( i + 1 ) + "</td>\n" +
            "\t\t\t\t\t\t<td style=\"border-right: 1px #000000 solid;border-top: 1px #000000 solid;text-align: center;padding:4px 4px\">" + item.coded + "</td>\n" +
            "\t\t\t\t\t\t<td style=\"border-right: 1px #000000 solid;border-top: 1px #000000 solid;text-align: center;padding:4px 4px\">" + item.name + "</td>\n" +
            "\t\t\t\t\t\t<td style=\"border-right: 1px #000000 solid;border-top: 1px #000000 solid;text-align: center;padding:4px 4px\">" + item.specs + "</td>\n" +
            "\t\t\t\t\t\t<td style=\"border-right: 1px #000000 solid;border-top: 1px #000000 solid;text-align: center;padding:4px 4px\">" + item.num + "</td>\n" +
            "\t\t\t\t\t\t<td style=\"border-right: 1px #000000 solid;border-top: 1px #000000 solid;text-align: center;padding:4px 4px\">" + item.price + "</td>\n" +
            "\t\t\t\t\t\t<td style=\"border-top: 1px #000000 solid;text-align: center;padding:4px 4px\">" + item.totalPrice + "</td>\n" +
            "\t\t\t\t\t</tr>"
    })
    dataHtml += htmlTableW;
    data.processModeData.forEach((item,i)=>{
        dataHtml += "<div style=\"margin-top: 15px;border-bottom: 1px #000000 solid;padding: 4px 6px;\">\n" +
            "\t\t\t\t<div>\n" +
            "\t\t\t\t\t<span style='display: inline-block;width: 30%;'>\n" +
            "\t\t\t\t\t\t审批时间：<span style='margin: 0px 5px 0px 5px;'>" + (item.dealDate == null ? "" : item.dealDate) +  "</span>\n" +
            "\t\t\t\t\t</span>\n" +
            "\t\t\t\t\t<span style='display: inline-block;width: 25%;'>\n" +
            "\t\t\t\t\t\t审批人：<span style='margin: 0px 5px 0px 5px;'>" + item.purchasingDealerName + "</span>\n" +
            "\t\t\t\t\t</span>\n" +
            "\t\t\t\t\t<span style='display: inline-block;width: 40%;'>\n" +
            "\t\t\t\t\t\t审批状态：<span style='margin: 0px 5px 0px 5px;'>" + dealTypeList[item.dealType] + "</span>\n" +
            "\t\t\t\t\t</span>\n" +
            "\t\t\t\t</div>\n" +
            "\t\t\t\t<div style=\"margin-top: 05px;\">\n" +
            "\t\t\t\t\t<span style='display: inline-block;width: 95%;'>\n" +
            "\t\t\t\t\t\t备注：<span style='margin: 0px 35px 0px 5px;'>" + (item.dealNote == null ? "" : item.dealNote) + "</span>\n" +
            "\t\t\t\t\t</span>\n" +
            "\t\t\t\t</div>\n" +
            "\t\t\t</div>"
    })
    dataHtml += htmlWB
    return dataHtml;
}